
%!TEX program = xelatex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt]{article} 

\input{wang_preamble.tex}

\begin{document}

\begin{center}
\includegraphics [width=0.85\textwidth, height=4.1cm]{lixin-pan-new.eps}
\end{center}

\vspace{-0.6cm}

\begin{center}
%{\LARGE\bf 上海立信会计金融学院期终考试卷 --- 试题纸} \hspace{0.3cm} {\Large \underline{ A }卷 }
{\Large\bf \H 上海立信会计金融学院期终考试卷 } \hspace{0.3cm} {\Large \underline{ A }卷 }

\vspace{0.3cm}

{\large \bf \H 2023 $\sim$ 2024 学年 第 二 学期 }

\vspace{0.3cm}

{\large \bf \H \underline{ \emph{2022级数学与应用数学专业} } 《\underline{ \emph{应用数学前沿专题} }》 课程代码：\underline{ 16330012B }  }

\vspace{0.3cm}

{\H（本场考试属\underline{  开  }卷考试，考试时间共\underline{  90  }分钟，可以使用机房电脑）共\underline{  4  }页 }
%{\large （本场考试属闭卷考试，考试时间 90 分钟，禁止使用计算器） }

\vspace{0.3cm}

%{\large 本考试卷共 4 页，请在本考试卷上答题。}

%\vspace{-0.3cm}
%\rule[-.3\baselineskip]{\textwidth}{0.2pt}

\vspace{0.4cm}

班级 \underline{\hspace{3.5cm}} 学号 \underline{\hspace{3.5cm}} 姓名 \underline{\hspace{3.5cm}} 

\end{center}

\vspace{-0.2cm}

{\H
\begin{table}[h]
%\caption{Nonlinear Model Results} % title of Table
\centering % used for centering table
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{
|>{\centering\arraybackslash}p{0.8cm}
|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}
|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}
%|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.7cm}
|>{\centering\arraybackslash}p{0.7cm}|>{\centering\arraybackslash}p{0.8cm}|>{\centering\arraybackslash}p{1.1cm}|>{\centering\arraybackslash}p{1.1cm}|}
\hline
题号 &一&二&三&四&五&六&七&总分&合成人签名&审核人签名 \\
%\hline
%应得分&15&15&15&15&15&15&10&100 \\
\hline
得分 $\,\,\,\,\,\,\,\,$ &&&&&&&&&& \\
\hline
\end{tabular}
\end{table}
}

%%%%%%%%%%%%%%%%%%%% 试题从这里开始 %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%% 试题从这里开始 %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%% 试题从这里开始 %%%%%%%%%%%%%%%%%%%%
本次考试共7题简答题，其中1-6题每题15分，第7题10分。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %1
\begin{enumerate}
\item  Eratosthenes筛法是如何找出所有素数的？
\item  使用下述程序计算1-1000之间有多少个素数。
\item  这段程序的while语句做了什么？
\end{enumerate}

\begin{python}
def sieve_v1(n):
    primes = list(range(2,n+1))
    for p in primes:
        if p*p>n:
            break
        product = 2*p
        while product <=n:
            if product in primes:
                primes.remove(product)
            product+=p
    return len(primes), primes
\end{python}

\vspace{0.2cm}




\vspace{0.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage 
\item %2
称复数 $c$ 是 Mandelbrot 集合中的点，如果数列 $$z_0=c, z_{n+1}=z_n^2+c, n=0,1,2,\cdots$$ 是有界的。
设 $c$ 不是 Mandelbrot 集合中的点。设 $N$ 是使得 $|z_N(c)|>2$ 的最小的正整数。
称这个 $N$ 为 $c$ 的逃逸参数。
\begin{enumerate}
\item  参考下述程序，编程计算 $c=-1.17+0.2j$ 的逃逸参数。
\item  查阅资料或目测，估计 Mandelbrot 集合的面积的大概是多少？
\item  证明：若 $|z_n|\ge 2$, 则 $|z_{n+1}|\ge 2$. 
\end{enumerate}

%编写一个循环语句，每次判断这个数列的下一项的模长是否大于2.
\begin{python}
c=-1.17+0.2j; z=c; count=0
while (abs(z)<=2) and (count<1000):
    z=z**2+c
    count=count+1
print(count)
\end{python}

%另一种计算，直接写出这个数列。
%\begin{python}
%#c=-1.16+0.2j
%c=-1.17+0.2j; z=c; x=[]; y=[]
%for k in range(100):
%    x.append(z.real); y.append(z.imag)
%    if abs(z)<2:
%        print('%d : %5.2f + %5.2f j , norm: %5.2f.' %(k,z.real,z.imag,abs(z)) )
%    else:
%        break
%    z=z**2+c
%print(z)
%import matplotlib.pyplot as plt
%plt.plot(x,y,'.-')
%\end{python}

\vspace{0.2cm}




\vspace{5.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %3

考虑范德波尔方程 $y''-(1-y^2)y'+y=0$, 设初始条件为 $y(0)=2, y'(0)=3$. 
\begin{enumerate}
\item  将该方程写成标准的一阶微分方程组。

\item  使用 scipy.integrate 模块的 odeint 函数计算数值解，求出 $y(10)$ 和 $y'(10)$ 的值。

\begin{python}
import numpy as np
from scipy.integrate import odeint

def rhs(z,t):
    return [ z[1], (1-z[0]**2)*z[1]-z[0] ]
t=np.linspace(0,10,101)
y0=np.array([2,3])
y=odeint(rhs,y0,t)
import matplotlib.pyplot as plt
plt.plot(y[:,0],y[:,1],'.-')
\end{python}

\end{enumerate}

\vspace{0.2cm}





\vspace{0.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage 
\item %4
\begin{enumerate}
\item  麦克-格拉斯方程是生物数学里的一个延迟微分方程模型，
\begin{equation*}
\left\{
\begin{aligned}
\frac{dx(t)}{dt} &= f(t,x) = a\frac{x(t-\tau)}{1+x(t-\tau)^m} - bx(t),\,\, t>0, \\ 
x(t) &= x_0(t), \,\, t\in [-\tau,0]. 
\end{aligned}
\right. 
\end{equation*}
其中 $a,b,\tau,m$ 是非负常数。
请介绍有关延迟微分方程的数值解的软件与参考文献。

\item  对 $-\tau\le t\le 0$, 设有初始值 $x(t)=x_0$. 使用一阶欧拉方法 $x_{i+1}=x_i+hf(t_i,x_i)$, 编程实现上述方程的数值解。设 $a=2,b=1,\tau=5,m=20,h=0.1,x_0=0.5,-5\le t\le 100$. 则 $x(100)$ 等于多少？

\begin{python}
import numpy as np
import matplotlib.pyplot as plt
a=2; b=1; tau=5; m=20; x_initial=0.5; t_final=100; h=0.1; d=50 
N=(tau+t_final)*10+1; t=np.linspace(-tau,t_final,N) 
x=np.zeros_like(t); x[0:d+1]=x_initial 

s=np.zeros_like(t) 
for k in range(d,len(t)-1):
    s[k]=a*x[k-d]/(1+x[k-d]**m)-b*x[k]
    x[k+1]=x[k]+h*s[k]

fig = plt.figure()
ax = fig.add_subplot(121)
ax.plot(t,x,'b--')
bx = fig.add_subplot(122)
bx.plot(x[0:N-15],x[15:N],'--')
fig.subplots_adjust(hspace=0.5, wspace=0.5)
\end{python}

\end{enumerate}

\vspace{0.2cm}




\vspace{5.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %5
记变量代换 $\left\{\begin{array}{rcl} u &=& x^2+y^2 \\ v &=& xy \end{array}\right.$ 的雅可比矩阵为 $J(x,y)$. 
\begin{enumerate}
\item  求雅可比行列式 $|J(x,y)|$ 在点 $(x,y)=(1,2)$ 的值。
\item  雅克比矩阵的几何意义是什么？
\end{enumerate}

\vspace{0.2cm}



\vspace{0.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage 
\item %6
考虑伯格斯方程的初边值问题 
\begin{equation*}
\left\{ 
\begin{aligned}
& u_t = -uu_x +\mu u_{xx}, \,\, 0\le t\le T, a\le x\le b, \\  
& u(0,x) = f(x), \\ 
& u(t,a) = g_1(t), u(t,b) = g_2(t).
\end{aligned}
\right. 
\end{equation*}

\begin{enumerate}
\item  有限差分法的求解思路是什么？
\item  谱方法的求解思路是什么？
\item  物理信息神经网络(PINN)的求解思路是什么？
\end{enumerate}

\vspace{0.2cm}




\vspace{7.2cm}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newpage 
\item %7

长度为 $N$ 的一维数组 $(f(0),f(1),\cdots,f(N-1))$ 的离散余弦变换(DCT)是指另一个长度为 $N$ 的一维数组
 $(g(0),g(1),\cdots,g(N-1))$, 其中每一个分量为
\begin{eqnarray*}
g(t) = a(t) \sum\limits_{x=0}^{N-1}f(x)\cos \left[ \frac{\pi(2x+1)t}{2N} \right], \,\,\,\, t=0,1,2,\cdots,N-1, 
\end{eqnarray*}
其中 $a(0)=\sqrt{1/N}$, $a(1)=a(2)=\cdots=a(N-1)=\sqrt{2/N}$.
\begin{enumerate}
\item  写出 $N=4$ 时的变换矩阵。
\item  写出傅立叶变换的定义。
\end{enumerate}

\vspace{0.2cm}




\vspace{0.2cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}





